Skip to content

config: Fixes html entities - #1184

Merged
romani merged 1 commit into
sevntu-checkstyle:masterfrom
Aman-Baliyan:literalInline
Aug 1, 2026
Merged

config: Fixes html entities#1184
romani merged 1 commit into
sevntu-checkstyle:masterfrom
Aman-Baliyan:literalInline

Conversation

@Aman-Baliyan

@Aman-Baliyan Aman-Baliyan commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

from checkstyle/checkstyle#20397
Fixes violations of PreferLiteralJavadocInlineTagCheck

@romani romani left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

items:

* <p>
* For example: if(getProperty() &amp;&amp; property) ==&gt; if(property &amp;&amp; getProperty()),
* For example:
* if(getProperty() &amp;&amp; property) =={@literal >} if(property &amp;&amp; getProperty()),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ideally this should be code.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ideally this should be code.

done


/**
* The found strings and their positions. &lt;String, ArrayList&gt;, with
* The found strings and their positions. {@literal <}String, ArrayList{@literal >}, with

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ideally this should be code.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ideally this should be code.

But there is not such a way to find whether to use code or literal because these docs are are not written inside <code> or <pre> . These are written as simple text.
But we can change the violation message for it - Prefer Javadoc inline tag '{@literal >}' or '{@code}' over '&gt;' and the rest depend on the users.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, exactly. So user will decide is it good for code or just literal.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ideally this should be code.

done

@romani romani left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot

@romani
romani merged commit b5f4935 into sevntu-checkstyle:master Aug 1, 2026
6 of 15 checks passed
@Aman-Baliyan
Aman-Baliyan deleted the literalInline branch August 1, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants